<!DOCTYPE html>
<html>
<head>
<title>${title}</title>
<meta charset="utf-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="Thu, 19 Nov 1900 08:52:00 GMT">

<?
	  include("/inc/header.html") {}
?>
</head>

<body class="sidebar-default header-fixed">
	<input id="userid" type="hidden" class="form-control"/>
	<div>
		<div class="news-ticker bg-orange">
			<div class="container">
				<ul id="news-ticker-content" class="list-unstyled mbn">
					<li><a href='#' , target='_blank'>曾经的苦，现在的痛，都是将来的笑颜！</a></li>
				</ul>
				<a id="news-ticker-close" href="javascript:;"><i
					class="fa fa-times"></i> </a>
			</div>
		</div>
		<!--BEGIN BACK TO TOP-->
		<a id="totop" href="#"><i class="fa fa-angle-up"></i> </a>
		<!--END BACK TO TOP-->
		<!--BEGIN TOPBAR-->
		
		<div id="header-topbar-option-demo" class="page-header-topbar">
			<nav id="topbar" role="navigation"
				style="margin-bottom: 0; z-index: 2;"
				class="navbar navbar-default navbar-static-top">
				<div class="navbar-header">
					<button type="button" data-toggle="collapse"
						data-target=".sidebar-collapse" class="navbar-toggle">
						<span class="sr-only">Toggle navigation</span><span
							class="icon-bar"></span><span class="icon-bar"></span><span
							class="icon-bar"></span>
					</button>
					<a id="logo" href="main.html" class="navbar-brand">
						<span class="logo-text" <?if(isNotEmpty(sysLogo)) {?> style="margin-top: -10px;" <?}?>  >
							<?if(isNotEmpty(sysLogo)) {?>
								<img src="${sysLogo}" width="40">
							<?}?> 
						${sysTitle} </span>
					</a>
				</div>
				<div class="topbar-main">
					<a id="menu-toggle" href="#" class="hidden-xs"><i class="fa fa-bars"></i></a>
					<!-- <form id="topbar-search" action="#" method="GET" class="hidden-xs">
						<div class="input-group">
							<input type="text" placeholder="搜索..." class="form-control" /><span
								class="input-group-btn"><a href="javascript:;"
								class="btn submit"><i class="fa fa-search"></i> </a> </span>
						</div>
					</form> -->
					
					<!-- 右侧通知区域 -->
					<ul class="nav navbar navbar-top-links navbar-right mbn">
						<!-- 	 
                        <li class="dropdown"><a data-hover="dropdown" href="#" class="dropdown-toggle"><i class="fa fa-bell fa-fw"></i><span class="badge badge-green">14</span></a>
                            <ul class="dropdown-menu dropdown-alerts">
                                <li>
                                    <p>您有14条未读通知信息</p>
                                </li>
                                <li>
                                    <div class="dropdown-slimscroll">
                                        <ul>
                                            <li><a href="#" target="_blank"><span class="label label-blue"><i class="fa fa-comment"></i></span>在线交流<span class="pull-right text-muted small">4 mins ago</span></a>
                                            </li>
                                            <li><a href="#" target="_blank"><span class="label label-violet"><i class="fa fa-twitter"></i></span>新的关注着<span class="pull-right text-muted small">12 mins ago</span></a>
                                            </li>
                                            <li><a href="#" target="_blank"><span class="label label-pink"><i class="fa fa-envelope"></i></span>邮件消息<span class="pull-right text-muted small">15 mins ago</span></a>
                                            </li>
                                            <li><a href="#" target="_blank"><span class="label label-green"><i class="fa fa-tasks"></i></span>新的任务<span class="pull-right text-muted small">18 mins ago</span></a>
                                            </li>
                                            <li><a href="#" target="_blank"><span class="label label-yellow"><i class="fa fa-upload"></i></span>服务器消息<span class="pull-right text-muted small">19 mins ago</span></a>
                                            </li>
                                            <li><a href="#" target="_blank"><span class="label label-green"><i class="fa fa-tasks"></i></span>新的任务<span class="pull-right text-muted small">2 days ago</span></a>
                                            </li>
                                            <li><a href="#" target="_blank"><span class="label label-pink"><i class="fa fa-envelope"></i></span>收件箱<span class="pull-right text-muted small">5 days ago</span></a>
                                            </li>
                                        </ul>
                                    </div>
                                </li>
                                <li class="last"><a href="extra-user-list.html" class="text-right">查看全部</a>
                                </li>
                            </ul>
                        </li>
                         
						 
                        <li class="dropdown"><a data-hover="dropdown" href="#" class="dropdown-toggle"><i class="fa fa-envelope fa-fw"></i><span class="badge badge-orange">7</span></a>
                            <ul class="dropdown-menu dropdown-messages">
                                <li>
                                    <p>您有7条未读消息</p>
                                </li>
                                <li>
                                    <div class="dropdown-slimscroll">
                                        <ul>
                                            <li><a href="#" target="_blank"><span class="avatar"><img src="images/p.png" alt="" class="img-responsive img-circle"/></span><span class="info"><span class="name">客户003</span><span class="desc">请问你数据加工完成了吗...</span></span></a>
                                            </li>
                                            <li><a href="#" target="_blank"><span class="avatar"><img src="images/p.png" alt="" class="img-responsive img-circle"/></span><span class="info"><span class="name">客户006<span class="label label-blue pull-right">New</span></span><span class="desc">请查收我的邮件...</span></span></a>
                                            </li>
                                            <li><a href="#" target="_blank"><span class="avatar"><img src="images/p.png" alt="" class="img-responsive img-circle"/></span><span class="info"><span class="name">管理员<span class="label label-orange pull-right">10 min</span></span><span class="desc">请抓紧处理知识库数据...</span></span></a>
                                            </li>
                                            <li><a href="#" target="_blank"><span class="avatar"><img src="images/p.png" alt="" class="img-responsive img-circle"/></span><span class="info"><span class="name">客户001</span><span class="desc">系统bug修复了吗...</span></span></a>
                                            </li>
                                            <li><a href="#" target="_blank"><span class="avatar"><img src="images/p.png" alt="" class="img-responsive img-circle"/></span><span class="info"><span class="name">客户002</span><span class="desc">数据处理的不错，加油...</span></span></a>
                                            </li>
                                        </ul>
                                    </div>
                                </li>
                                <li class="last"><a href="#" target="_blank">查看全部</a>
                                </li>
                            </ul>
                        </li>
                          
                        <li class="dropdown"><a data-hover="dropdown" href="#" class="dropdown-toggle"><i class="fa fa-tasks fa-fw"></i><span class="badge badge-yellow">8</span></a>
                            <ul class="dropdown-menu dropdown-tasks">
                                <li>
                                    <p>您还有8个待处理任务</p>
                                </li>
                                <li>
                                    <div class="dropdown-slimscroll">
                                        <ul>
                                            <li><a href="#" target="_blank"><span class="task-item">人物机构数据合并<small class="pull-right text-muted">40%</small></span><div class="progress progress-sm"><div role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%;" class="progress-bar progress-bar-orange"><span class="sr-only">40% Complete (success)</span></div></div></a>
                                            </li>
                                            <li>
                                                <a href="#" target="_blank"> <span class="task-item">数据处理定时任务<small class="pull-right text-muted">60%</small></span>
                                                    <div class="progress progress-sm">
                                                        <div role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%;" class="progress-bar progress-bar-blue"><span class="sr-only">60% Complete (success)</span>
                                                        </div>
                                                    </div>
                                                </a>
                                            </li>
                                            <li>
                                                <a href="#" target="_blank"> <span class="task-item">数据导入[机构]<small class="pull-right text-muted">55%</small></span>
                                                    <div class="progress progress-sm">
                                                        <div role="progressbar" aria-valuenow="55" aria-valuemin="0" aria-valuemax="100" style="width: 55%;" class="progress-bar progress-bar-green"><span class="sr-only">55% Complete (success)</span>
                                                        </div>
                                                    </div>
                                                </a>
                                            </li>
                                            <li>
                                                <a href="#" target="_blank"> <span class="task-item">数据导出[人物]<small class="pull-right text-muted">78%</small></span>
                                                    <div class="progress progress-sm">
                                                        <div role="progressbar" aria-valuenow="78" aria-valuemin="0" aria-valuemax="100" style="width: 78%;" class="progress-bar progress-bar-yellow"><span class="sr-only">78% Complete (success)</span>
                                                        </div>
                                                    </div>
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </li>
                                <li class="last"><a href="#" target="_blank">查看全部</a>
                                </li>
                            </ul>
                        </li>
                         -->
						<li class="dropdown topbar-user"><a data-hover="dropdown"
							href="#" class="dropdown-toggle"><img src="images/p.png"
								alt="" class="img-responsive img-circle" />&nbsp;<span
								id="userNickname" class="hidden-xs"> ${username}</span>&nbsp;<span
								class="caret"></span> </a>
							<ul class="dropdown-menu dropdown-user pull-right">
								<li><a href="geren-geRen-ziLiao.html"><i class="fa fa-user"></i>个人资料</a></li>
								<!--  
								<li><a href="#"><i class="fa fa-envelope"></i>我的消息<span
										class="badge badge-danger">3</span> </a></li>
								<li><a href="#"><i class="fa fa-tasks"></i>我的任务<span
										class="badge badge-success">7</span> </a></li>
								<li class="divider"></li>
								<li><a href="#"><i class="fa fa-lock"></i>锁定屏幕</a></li>
								-->
								<li><a href="javascript:tuichu();"><i class="fa fa-key"></i>安全退出</a>
								</li>
							</ul>
						</li>
					</ul>
				</div>
			</nav>

		</div>
		<!--END TOPBAR-->
		
		<div id="wrapper">
			<!--BEGIN SIDEBAR MENU-->
			 <nav id="sidebar" role="navigation" class="navbar-default navbar-static-side">
				<div id="nei" class="sidebar-collapse menu-scroll">
				
			
				</div>
			</nav>
			<!--END SIDEBAR MENU-->
			<!--BEGIN CHAT FORM-->
			<div id="chat-form" class="fixed">
				<div class="chat-inner">
					
					<div id="group-1" class="chat-group">
						
					</div>
					<div id="group-2" class="chat-group">
						
					</div>
					<div id="group-3" class="chat-group">
						
					</div>
				</div>
				<div id="chat-box" style="top:400px">
					<div class="chat-box-header">
						
					</div>
					<div class="chat-content">
						<ul class="chat-box-body">
							
						</ul>
					</div>
					
				</div>
			</div>
			<!--END CHAT FORM-->

			<!-- BEGIN PAGE WRAPPER中间区域  -->
			
			${layoutContent}

		</div>
		</div>
		</body>
		</html>
		
		<!-- ./wrapper -->

<script type="text/javascript">


	
	function tuichu(){
		$.ajax({
				type : "post",
				url : "./loginLayout.do",
				data : {
				},
				dataType : "json",
				async : false,
				success : function(data) {
						deleteCookie("userName","/");
		   				 deleteCookie("userPass","/");
						window.location.href = "login.html";
				}
			});
		}
	//清除cookie
	function deleteCookie(name,path){   /**根据cookie的键，删除cookie，其实就是设置其失效**/  
	    var name = escape(name);  
	    var expires = new Date(0);  
	    path = path == "" ? "" : ";path=" + path;  
	    document.cookie = name + "="+ ";expires=" + expires.toUTCString() + path;  
	} 
	$(function() {
		xianshimenu();
		
	});
	
	

	$(function() {
		$('#menu-toggle').click(function(){
			if ($('body').hasClass('sidebar-collapsed')) {
				$('#side-menu').attr('style', '').parent('.slimScrollDiv')
						.replaceWith($('#side-menu'));
			} else {
				setTimeout(function() {
					$('#side-menu').slimScroll({
						"height" : $(window).height() - 50,
						'width' : '250px',
						'wheelStep' : 30
					});
					$('#side-menu').focus();
				}, 500);
			}
		});
		
		setTimeout(function() {
					$('#side-menu').slimScroll({
						"height" : $(window).height() - 50,
						'width' : '250px',
						'wheelStep' : 30
					});
					$('#side-menu').focus();
				}, 500);
	});
	
	//菜单加载
	var xianshiid=-1;
	var xianshiidid=-1;
	function xianshimenu() {
		$.ajax({
					type : "post",
					url : "./KnowledgemenuListall.do",
					data : {
					},
					dataType : "json",
					async : false,
					success : function(data) {
						var str = "";
					$("#nei").html("");
					
						str+="<ul id=\"side-menu\" class=\"nav\"><li class=\"user-panel\" style=\"height:10px;\" ><span></span>"
                            +"<div class=\"clearfix\"></div></li>";
						url=window.location.pathname;
						
						url=url.substring(url.lastIndexOf("/")+1,url.length);
						var url2=url.split("-");
						
						for ( var i = 0; i < data.child.length; i++) {
						//没有二级标题
						  if(data.child[i].child==null)
						{
						       var ttemp1=data.child[i].ld;
						       var ttemp2=ttemp1.split("-");
						       str += "<li id="+data.child[i].id+" ";
						            if(ttemp2[0]==url2[0])
						            { 
						                     str += "   class=\"active\"";
						                      xianshiid=data.child[i].id;
						            }else{
						                    str += "  class=\"\"";
						                 }
						          
						         var regu="[a-zA-z]+://[^\s]*";
								var re = new RegExp(regu);
								if (re.test(data.child[i].ld)) {   
						    		 str += " ><a href="+data.child[i].ld+" target='_blank' onclick=\"subgo("+data.child[i].id+")\"><i class="+"\""+data.child[i].icon+"\""+"><div class=\"icon-bg bg-pink\"></div> </i><span class=\"menu-title\">"+data.child[i].name+"</span> </a>";
						     	}else{
						     		 str += " ><a onclick=\"hint()\"><i class="+"\""+data.child[i].icon+"\""+"><div class=\"icon-bg bg-pink\"></div> </i><span class=\"menu-title\">"+data.child[i].name+"</span> </a>";
						     	}
						     str += " <input type=\"hidden\"  id=a"+data.child[i].id+"  class=\"nav nav-second-level collapse\" > ";
						     str += " <input type=\"hidden\"  id=b"+data.child[i].id+"  class=\"active\" > </li>";
						}else
						{
						//有二级标题
// 						 var temp1=data.child[i].child[0].ld;
						 var temp1=data.child[i].ld;
						 var temp2=temp1.split("-");
						 str += "<li id="+data.child[i].id+" ";
						if(temp2[0]==url2[0])
						{ 
						str += "   class=\"active\"";
						xianshiid=data.child[i].id;
						}else{
						str += "  class=\"\"";
						}
						str += " ><a href=\"#\" onclick=\"subgo("+data.child[i].id+")\"><i class="+"\""+data.child[i].icon+"\""+"><div class=\"icon-bg bg-pink\"></div> </i><span class=\"menu-title\">"+data.child[i].name+"</span><span class=\"fa arrow\"></span> </a><ul";
						
						if(temp2[0]==url2[0])
						{ 
						str += " id=a"+data.child[i].id+"   class=\"nav nav-second-level collapse in\"";
						//xianshiid=data.child[i].child[0].id;
						}else{
						str += " id=a"+data.child[i].id+" class=\"nav nav-second-level collapse\"";
						}
						str+=">";
						//添加二级标题
						for(var j=0;j<data.child[i].child.length;j++)
						{    
						
						//有没有三级标题
						if(data.child[i].child[j].child==null) 
						{
						//没有三级标题
						            var temp3=data.child[i].child[j].ld;
						             var temp4=temp3.split("-");;
						            str +="<li  id="+data.child[i].child[j].id+"";
					                 if(temp3==url){  xianshiidid=data.child[i].child[j].id;
						                str += "   class=\"active\" ";
						            }
						     	 var regu="[a-zA-z]+://[^\s]*";
								var re = new RegExp(regu);
								if (re.test(temp3)) {
							        str +=" ><a href="+temp3+" target='_blank'><i class="+"\""+data.child[i].child[j].icon+"\""+"></i><span class=\"submenu-title\">"+data.child[i].child[j].name+"</span> </a>";
						   		 }else{
						   		 	str +=" ><a href="+temp3+"><i class="+"\""+data.child[i].child[j].icon+"\""+"></i><span class=\"submenu-title\">"+data.child[i].child[j].name+"</span> </a>";
						   		 }
						     str += " <input type=\"hidden\"  id=a"+data.child[i].child[j].id+"  class=\"nav nav-second-level collapse\" > ";
						     str += " <input type=\"hidden\"  id=b"+data.child[i].child[j].id+"  class=\"active\" > </li>";
					    }
					    else{
						          var ttemp3=data.child[i].child[j].child[0].ld;
						          var ttemp4=ttemp3.split("-");;
						          str += "<li  id="+data.child[i].child[j].id+"";
					        	  if(ttemp4[1]==url2[1])
						            { 
						             str += "   class=\"active\"";
						              xianshiidid=data.child[i].child[j].id;
						           }else{
						             str += "  class=\"\"";
						           }
						str += " ><a href=\"#\" onclick=\"subgon("+data.child[i].child[j].id+")\"><i class="+"\""+data.child[i].child[j].icon+"\""+"><div class=\"icon-bg bg-pink\"></div> </i><span class=\"menu-title\">"+data.child[i].child[j].name+"</span><span class=\"fa arrow\"></span> </a><ul";
						if(ttemp4[1]==url2[1])
						{ 
						str += " id=a"+data.child[i].child[j].id+"   class=\"nav nav-third-level in collapse\"";
						//xianshiid=data.child[i].child[0].id;
						}else{
						str += " id=a"+data.child[i].child[j].id+" class=\"nav nav-third-level collapse \"";
						}
						str+=">";
						for(var m=0;m<data.child[i].child[j].child.length;m++)
						{     var temp5=data.child[i].child[j].child[m].ld;
						
						 str +="<li   ";
					          if(temp5==url)
						            { 
						                str += " id=b"+data.child[i].child[j].id+" class=\"active\" ";
						            }
                        str+="><a href="+data.child[i].child[j].child[m].ld+"><i class="+"\""+data.child[i].child[j].child[m].icon+"\""+"></i><span class=\"submenu-title\">"+data.child[i].child[j].child[m].name+"</span></a></li>";
						}
						str+="</ul></li>";
						
						}
						
						}
	                    str+="</ul></li>";
						}
						}
						str +="</ul>";
						
						$("#nei").append(str);

					},
					error : function(data) {
						alert("请求失败");
					}
				});

	};
	function subgo(kk){
		if(kk!=xianshiid){
			if(xianshiid!=-1){
				document.getElementById(xianshiid).className="";
				document.getElementById("a"+xianshiid).className="nav nav-second-level collapse";
			   // document.getElementById("b"+xianshiid).className="";
			    document.getElementById(xianshiid).className="";
				document.getElementById(kk).className="active";
				document.getElementById("a"+kk).className="nav nav-second-level collapse in";
				xianshiid=kk;
			}else{
				xianshiid=kk;
				document.getElementById("a"+xianshiid).className="nav nav-second-level collapse in";
			}
		
		}else{
			if(document.getElementById("a"+kk).className=="nav nav-second-level collapse in"){
				document.getElementById("a"+xianshiid).className="nav nav-second-level collapse ";
			}else{
				document.getElementById("a"+xianshiid).className="nav nav-second-level collapse in";
			}
		}
	}
	
	function subgon(kk)
	{
	
	if(kk!=xianshiidid)
	{
	if(xianshiidid!=-1)
	{ 
	document.getElementById("a"+kk).className="nav nav-third-level in collapse";
	document.getElementById("a"+xianshiidid).className="nav nav-third-level  collapse";
	document.getElementById(xianshiidid).className="";
	document.getElementById(kk).className="active";
	xianshiidid=kk;
	}else
	{
	document.getElementById("a"+kk).className="nav nav-third-level in collapse";
	xianshiidid=kk;
	}
	
	}
	else
	{
	if(document.getElementById("a"+kk).className=="nav nav-third-level in collapse")
	{
	xianshiidid=kk;
	document.getElementById("a"+xianshiidid).className="nav nav-third-level  collapse";
	}else
	{
	xianshiidid=kk;
	document.getElementById("a"+xianshiidid).className="nav nav-third-level in collapse";
	}
	}
	}
	
	//没权限时提示
	function hint(){
		layer.msg('抱歉，您没有权限查看此列表下资源！如需要查看请联系管理员！');
	}
</script>
		<?
	include("/inc/footer.html"){}
  ?>